#!/bin/sh

先安装 nvm

git clone https://github.com/creationix/nvm.git
source nvm/nvm.sh

nvm install 12.22.12
npm install -global @angular/cli
ng add @ionic/cordova-builders



sudo nano /etc/lightdm/lightdm.conf
autologin-user=kali
autologin-user-timeout=0

sudo nano /boot/config.txt
hdmi_group=2
hdmi_mode=82
over_voltage=6
arm_freq=2000
gpu_freq=600
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.11
sudo setcap CAP_SYS_RAWIO=+eip /usr/bin/python3.11 
树莓派
dtoverlay=uart2

sudo apt-get install synaptic firefox-esr-l10n-zh-cn
sudo apt-get install synaptic firefox-esr-l10n-zh-cn geany -y

sudo sed -i 's/kali-raspberry-pi/pi/' /etc/hostname
sudo sed -i 's/kali-raspberry-pi/pi/' /etc/hosts
sudo dpkg-reconfigure locales

sudo apt update
sudo apt-get dist-upgrade




sudo -u kali jupyter notebook --allow-root &
#sudo -u pi nohup /home/pi/.local/bin/wssh --address='0.0.0.0' --port=9999 &
exit 0


linux下3种kill所有python进程的方法 这篇文章主要介绍了linux下3种kill所有python进程的方法,需要的朋友可以参考下

在linux系统管理中，我们有时候需要kill掉所有python进程，初学者一般先查询出python正在运行的进程（ps -ef|grep python），然后一条条kill掉，或者写好一个脚本(方法2)，实际上方法都有现成的，这边有3种方法.

1. killall方式 # killall python

2.pkill方式

sudo pkill python 2. ps方式（脚本） ps列出ttlsa的pid，然后依次kill掉，比较繁琐. # ps -ef | grep python | grep -v grep | awk '{print $2}' | xargs kill -9

#!/bin/bash

PROCESS=`ps -ef | grep python | grep -v grep | awk '{print $2}' | xargs kill -9`
#PROCESSE=`ps -ef | grep demo1.py | grep -v grep | awk '{print $2}' | xargs kill -9`
#PROCESSA=`ps -ef | grep demo2.py | grep -v grep | awk '{print $2}' | xargs kill -9`
#PROCESSB=`ps -ef | grep demo3.py | grep -v grep | awk '{print $2}' | xargs kill -9`

#! /bin/bash
mkdir  /home/kali/.jupyter /home/kali/jupyter
touch  /home/kali/.jupyter/jupyter_notebook_config.json /home/kali/.jupyter/jupyter_notebook_config.py
cat > /home/kali/.jupyter/jupyter_notebook_config.json << EOF
{
  "NotebookApp": {
    "password": "argon2:$argon2id$v=19$m=10240,t=10,p=8$d2T9H80lXg5LVDTbBOzzQg$0Xthg546aD3rJd/5E9/1nw"
  }
}
EOF



cat > /home/kali/.jupyter/jupyter_notebook_config.py << EOF
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
c.NotebookApp.notebook_dir = '/home/kali/jupyter/'
EOF



#cd ~/jupyter && git add . && git commit -m "first commit" && git push -u origin "master"
#jupyter notebook --allow-root
sudo sed -i 's/127.0.0.1/0.0.0.0/' /etc/mysql/mariadb.conf.d/50-server.cnf
sudo sed -i 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config




sudo sed -i 's/#dtoverlay=gpio-ir,gpio_pin=17/dtoverlay=gpio-ir,gpio_pin=17/' /boot/config.txt
sudo sed -i 's/#dtoverlay=gpio-ir-tx,gpio_pin=18/dtoverlay=gpio-ir,gpio_pin=17/' /boot/config.txt
sudo sh -c 'echo "dtoverlay=uart2" >> /boot/config.txt'


sudo sed -i 's/kali-raspberry-pi/pi/' /etc/hostname
sudo sed -i 's/kali-raspberry-pi/pi/' /etc/hosts

sudo sed -i 's/KeepAlive On/KeepAlive Off/' /etc/apache2/apache2.conf
sudo sed -i 's/Require all denied/Require all granted/' /etc/apache2/apache2.conf
sudo sed -i 's/www-data/kali/' /etc/apache2/envvars
sudo sed -i 's/\/var\/www\/html/\/home\/kali\/pi\/server/' /etc/apache2/sites-enabled/000-default.conf
#sudo nano /etc/apache2/ports.conf

sudo a2dismod mpm_event
sudo a2enmod mpm_prefork
sudo service apache2 restart
sudo systemctl enable apache2

source ~/.bashrc


